package com.zm.devmag.util;

public class RandomString {
	/**
	 * 产生随机字符串
	 * @param maxStringLenght
	 * @return
	 */

	public static String getRandomString(int maxStringLenght){
		String zhongZi = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
        char[] rands = new char[maxStringLenght]; 
        for (int i = 0; i < rands.length; i++) 
        { 
            int rand = (int) (Math.random() * zhongZi.length()); 
            rands[i] = zhongZi.charAt(rand); 
        } 
		return String.valueOf(rands);
	}

}
